import Cookies from 'js-cookie'
import request from '@/utils/request'
const TokenKey = 'Admin-Token'

// 单点登录
export function avoidTheLogin() {
  return request({
    url: '/avoid-the-login',
    method: 'post',
    headers: {
      "iv-user": "sysadmin",
      "carLicense": "xxx"
    }
  })
}

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
